package com.pyue.eam.app.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * app用户表
 *
 * @author aeizzz
 * @date 2022-12-07 09:52:03
 */
@Data
@TableName("app_user")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "app用户表")
public class AppUser extends AppBaseEntity {

    /**
     * userId
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "userId")
    private Long userId;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;

    /**
     * 密码
     */
    @Schema(description = "密码")
    private String password;

    /**
     * 随机盐
     */
    @JsonIgnore
    @Schema(description = "随机盐")
    private String salt;

    /**
     * 手机号
     */
    @Schema(description = "手机号")
    private String phone;

    /**
     * 头像
     */
    @Schema(description = "头像")
    private String avatar;

    /**
     * 昵称
     */
    @Schema(description = "拓展字段:昵称")
    private String nickname;

    /**
     * 姓名
     */
    @Schema(description = "拓展字段:姓名")
    private String name;

    /**
     * 地址
     */
    @Schema(description = "地址")
    private String addr;

    /**
     * 0是默认无 1企业方 2 团长 3 职工
     */
    @Schema(description = "用户类型")
    private String roleTypeId;

    /**
     * 邮箱
     */
    @Schema(description = "拓展字段:邮箱")
    private String email;

    /**
     * 最后一次密码修改时间
     */
    @Schema(description = "最后一次密码修改时间")
    private LocalDateTime lastModifiedTime;

    /**
     * 锁定标记
     */
    @Schema(description = "锁定标记")
    private String lockFlag;

    /**
     * 微信小程序登录openId
     */
    @Schema(description = "微信小程序登录openId")
    private String wxOpenid;

    /**
     * 开发平台uid
     */
    private String unionId;

    /**
     * tenantId
     */
    @Schema(description = "tenantId", hidden = true)
    private Long tenantId;

}
